<!doctype html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <title>工人详细页</title>

    <!-- Bootstrap -->
    <!-- Bootstrap -->
    <link th:insert="common/head :: commonheader">
    <link rel="stylesheet" th:href="@{/css/worker.css}">
    <link rel="stylesheet" th:href="@{/css/employInfo.css}">
    <script type="text/javascript" src="https://api.map.baidu.com/api?v=1.0&&type=webgl&ak=yTVAbw4Nv78bYsi0PiPbbXt8VD8V6RYp"></script>



</head>

<body style="background-color: #F5F6FA">

    <div class="container">
        <!-- nav -->
        <div class="row clearfix">
            <div class="col-md-12 column">
                <div th:insert="common/head :: header"></div>
            </div>
        <!-- nav -->
        </div>
    </div>

    <div class="container">
        <!-- body -->
        <div class="row" >
            <div class="first_base col-md-12">
                <div class="col-md-12" style="background-color: #ffffff;">
                    <div class="col-md-1 first_base_one">
                        <img th:src="@{/images/logo.png}" alt="" class="first_base_img">
                    </div>
                    <div class="col-md-11 ">
                        <div>
                            <h4 style="font-weight: 800;" th:text="${work.getUser().getRealName()}">张三</h4>
                            <span th:text="${work.getUser().getSex()}==0?'男':'女'">男 </span>|
                            <span th:text="${work.getUser().getAge()}">30岁</span> | 发布时间:
                            <span th:text="${work.getPublishTime().substring(0,work.getPublishTime().length()-2)}"></span>
                        </div>
                    </div>
                    <div class="col-md-12 first_base">
                        <div class="col-md-1 first_base_one"><span class="text_df"> <b> 工种 :</b></span></div>
                        <div class="col-md-11 first_base_two">
                            <div>
                                <span class="" >【[[${work.getExpectedWork()}]]】</span>


                                <!--                            0表示个人，1表示班组，2表示施工队，3表示突击队-->
                                <span class="" th:if="${work.getStaffComposition()==0}">【个人】</span>
                                <span class="" th:if="${work.getStaffComposition()==1}">【班组】</span>
                                <span class="" th:if="${work.getStaffComposition()==2}">【施工队】</span>
                                <span class="" th:if="${work.getStaffComposition()==3}">【突击队】</span>


                                <!--                            (0兼职、1实习、2高级工(大工)-->
                                <span class="" th:if="${work.getWorkNature()==0}" >【兼职】</span>
                                <span class="" th:if="${work.getWorkNature()==1}" >【实习】</span>
                                <span class="" th:if="${work.getWorkNature()==2}" >【高级工(大工】</span>
                            </div>
                        </div>
                    </div>
                    <div class="col-md-12 first_base">
                        <div class="col-md-1 first_base_one" style="padding-left: 2px;"><span class="text_df"> <b> 期望地区 :</b></span></div>
                        <div class="col-md-11 first_base_two">
                            <div style="padding-left: 7px;">
                                <span class="" th:text="${work.getAddress()}">广州 |东莞 |佛山</span>
                            </div>
                        </div>
                    </div>
                    <div class="col-md-12 first_base">
                        <div class="col-md-1 first_base_one" style="padding-left: 2px;"><span class="text_df"> <b> 联系电话 :</b></span></div>
                        <div class="col-md-11 first_base_two">
                            <div style="padding-left: 7px;" >
                                <span class="well well_padding " th:text="${work.getUser().getPhone().substring(0,work.getUser().getPhone().length()-4)}+'****'" style="width: 120px;height: 30px;font-size: large" id="phone">1649846****</span>
                                <input type="hidden" id="realName" th:value="${session.user?.getRealName()}">
                                <input type="hidden" id="realPhone" th:if="${session.user?.getRealName()}" th:value="${work.getUser().getPhone()}">
                                <a class="btn btn-primary" id="call">立即联系</a>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-md-12" style="background-color: #ffffff; margin-top: 10px;">
                    <div class="col-md-12" style="margin-top: 10px;">
                        <h4 style="font-weight: 800;">自我介绍</h4>
                        <div class="zw_js">
                            <p style="margin-bottom: 0px;" th:text="${work.getMyselfDescribe()}">广州张三劳务/专业临时工/男女普工/装卸工/工程小工/力工/物流/仓库/人力外包/企业管理策划等服务 欢迎工厂大企业咨询
                            </p>
                        </div>
                    </div>
                </div>
                <div class="col-md-12" style="background-color: #ffffff; margin-top: 10px">
                    <div class="col-md-12" style="margin-top: 10px; margin-bottom: 20px;">
                        <h4 style="font-weight: 800;">项目经验</h4>
                        <div class="zw_js" th:if="${projects != null}" th:each="project:${projects}" style="background-color: #fafafa; margin-top: 5px;">
                            <h5 style="font-weight: 800;" th:text="${project.getProjectName()}">金保有限公司</h5>
                            <div>
                                <span class="text_df">工作时间 :</span>
                                <span class="" th:text="${project.getStartTime().substring(0,10)}">2021-3-18</span>
                                <span class="">--</span>
                                <span class="" th:text="${project.getEndTime().substring(0,10)}">2022-4-16</span>
                            </div>
                            <div>
                                <span class="text_df">工作地区 :</span>
                                <span class="" th:text="${project.getProjectAddress()}">广东</span>
                            </div>
                            <div>
                                <span class="text_df">工作内容 :</span>
                                <span class="" th:text="${project.getProjectDescribe()}">电商打包</span>
                            </div>

                        </div>
                    </div>

                    <div class="col-md-12" style="margin-top: 10px; margin-bottom: 20px;" th:if="${projects == null}">
                        <h4 style="font-weight: 800;">项目经验</h4>
                        <div class="zw_js">
                            <h5 style="font-weight: 800;" th:if="${project==null}">暂无项目经验</h5>
                        </div>
                        <div id="container"></div>
                    </div>
                </div>

                <div class="col-md-12" id="worker_box" style="padding: 0px;">
                    <h4 style="font-weight: 800; ">为你推荐更多:</h4>
                    <div class="media well gongren-work" id="box0" th:each="work:${recommends}" style="background-color: #ffffff; margin-bottom: 5px;margin-top: 5px;">
                        <div class="media-body row">
                            <div class="row">
                                <div class="col-md-1">
                                    <a href="#" class="pull-left"><img th:src="@{/images/42.jpg}" height="60" width="60" class="media-object" alt='' /></a>
                                </div>
                                <a th:href="@{'/toEmployee/'+${work.getId()}}">

                                    <div class="col-md-9" style="padding: 0;">
                                        <h4 class="media-heading">
                                            <b th:text="${work.getUser().getRealName()}"></b></h4>
                                        <span>性别:</span>
                                        <span th:text="${work.getUser().getSex()==0?'男':'女'}"></span>
                                        <span th:text="|年龄:${work.getUser().getAge()} 工种:${work.getExpectedWork()} |"></span>
                                        <span >工作性质:</span>
                                        <span th:if="${work.getWorkNature()==0}">兼职</span>
                                        <span th:if="${work.getWorkNature()==1}">长期工</span>
                                        <span th:if="${work.getWorkNature()==2}">高级工</span>
                                        </span><br>

                                        <div class="media">
                                            <div class="media-body">
                                                <div style="margin-top: 0; padding: 0px;">
                                                    <p class="text-defult" th:text="${work.getMyselfDescribe()}"></p>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-md-2" style="padding: 0;">
                                        <a class="btn btn-primary" th:href="@{'/toEmployee/'+${work.getId()}}" role="button" style="float: left; margin-left: 90px;">立刻联系</a>
                                        <div style="float: right; margin-top: 20px; margin-right: 20px;"><img src="/images/ic_local.png" style=" width: 16px;height: 16px;"><span class="small text-primary" th:text="${work.getAddress()}"></span></div>
                                        <div style="float: right; margin-top: 20px; margin-right: 20px;">
                                        </div>
                                    </div>
                                </a>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <!-- footer -->
        <footer th:insert="common/head :: footer">
        </footer>
        <!-- footer -->
    </div>
    <script>
        let realName = document.getElementById('realName').value;
        let call = document.getElementById('call');
        call.onclick = function (){
            if (realName===null||realName===''){
                alert("账号未实名,请先完成验证");
                window.location.href = '/user/getEmployeeWork';

            }else {
                document.getElementById('phone').textContent=document.getElementById('realPhone').value;
            }
        }
    </script>
</body>
</html>